import request from '@/utils/axios';
import appName from "@/api/appName";

// 获取疾病树
export function getIllnessTreeApi(params) {
    return request({
      url: appName.HQNR+'/diseaseTree/getTree',
      method: 'post',
      data: params
    })
}

// 新增或修改疾病分类
export function insertOrUpdateCategoryApi(params) {
    return request({
      url: appName.HQNR+'/diseaseTree/category/insertOrUpdate',
      method: 'post',
      data: params
    })
}

// 新增或修改疾病
export function insertOrUpdateDiseaseApi(params) {
    return request({
      url: appName.HQNR+'/diseaseTree/disease/insertOrUpdate',
      method: 'post',
      data: params
    })
}

// 删除疾病分类
export function removeCategoryApi(params) {
  return request({
    url: appName.HQNR+'/diseaseTree/category/removeById',
    method: 'post',
    data: params
  })
}

// 删除疾病
export function removeDiseaseApi(params) {
  return request({
    url: appName.HQNR+'/diseaseTree/disease/removeById',
    method: 'post',
    data: params
  })
}
